File Download Element

The File Download Element works in conjunction with the File Upload Element, allowing users to download files within a form which have previously been uploaded using the File Upload Element. The files can have been uploaded from the same or a different form and can be stored as files or within the File Upload database. As far as the Download Element is concerned, it makes no difference whether the file is stored within the file system or the database.

The File Download Element consists of a single button which the form user can click or tap in order to download a file. The file to be downloaded will be determined by the input mappings assigned to the Element (see the Data tab properties below for more details). The file will be downloaded and can be opened and/or saved in the standard manner for the browser running the form.

You will need to be familiar with the operation of the File Upload Element, in order to use the File Download Element. In particular, you will need to know the connection string for the File Upload table's sister database table which contains the records of the uploaded files you want to access from this form. You don't need to create a Datasource and Dataset for the File Upload table, NDLFXFile, this will be done automatically by Digitise Forms when you publish your form.

You can add multiple File Download Elements to a form if you want to allow users to download more than one file per data record.

 

When you add a File Download Element to your form, you need to create a Datasource and Dataset for the relevant File Upload's sister table and allow for this Dataset to be downloaded to the form, e.g. using a Button with its Clicked Event configured to load the Datasource or using the Loads with Form property.

In addition, you will need to provide a means for a user to locate the record(s), in the sister table, containing the details about the uploaded file(s) they want to download. For example, you could add appropriate Elements to the form, input mapped to the sister table, to display information which would identify the current record to the user. Buttons could be provided to allow the user to move through the records in the sister Dataset, until they reach a record whose associated file(s) they want to download. They could then use the File Download Element to download the file. If each record contains multiple file uploads and your user may want to download more than one file from a record, you will need to add separate File Download Elements for each file to be downloaded.

 

 

The File Upload Element stores uploaded files, which are saved as files, in the form's Fileuploads folder below the form's web app root folder, e.g. C:\inetpub\wwwroot\<project name>\Fileuploads.

The user under which the IIS Application Pool running your form is running will need read permissions to the folder storing the files to be downloaded. If the Application Pool is running under the ApplicationPoolIdentity user refer to the FAQs for information on giving this user access to your specified folder.

If you have stored uploaded files in the database, on the other hand, you will need to specify a suitable user to access the databases holding the uploaded file records within the connection string(s) for the relevant Datasources.

 

By default IIS restricts file downloads to a maximum file size of 2GB.

 

 

 


See also:

File Upload